#!/bin/bash

# Parameters
count=500
language="danish"
genesize="400"
size="10"
name="exp-ip10-cf-land-gene"
experiment="-train.iterations1=0 -train.iterations2=10"

# Initialization
i=1000
date=`date +"%Y-%m-%d"`
mkdir -p experiments/todo
mkdir -p experiments/results

# Create experiments
i=0
while [ $i -lt $count ] ; do
	# Increment counter
	i=$(($i + 1))

	# Generate gene
	gene=`experiments/makegene $genesize`
	id=$((1000+$i))
	xname="$name-$id"
	file="experiments/todo/$date-$xname-$language-$size.sh"
	echo "#!/bin/bash" > $file
	echo "echo" >> $file
	echo "export exp=\"$xname\"" >> $file
	echo "echo" >> $file
	echo "echo ===== experiments/$xname $language $size =====" >> $file
	echo "echo" >> $file
	echo "sleep 5" >> $file
	echo "sh experiments/experiment $language $size $experiment -genes=$gene" >> $file
	echo "echo" >> $file
	echo "sleep 10" >> $file
done


